package elcs.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import elcs.board.model.BoardVO;
import elcs.member.model.MemberVO;
import elcs.reply.model.ReplyService;
import elcs.reply.model.ReplyVO;

@Controller
public class ReplyController {
	@Resource(name="replyServiceImpl")
	private ReplyService replyService;
	
	@RequestMapping("/reply/replyWrite.do")
	@ResponseBody
	public List replyWrite(ReplyVO rvo) throws Exception{
		
		replyService.writeReply(rvo);
		
		List<ReplyVO> list=replyService.replyList(rvo);
		
		return list;
		
	}
	@RequestMapping("/reply/replyList.do")
	@ResponseBody
	public List replyList(ReplyVO rvo) throws Exception{
		
		List<ReplyVO> list=replyService.replyList(rvo);
		
		return list;
	}

}
